package com.ophelisis.persistence.dao.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.ophelisis.ibatis.handler.handler_menu;
import com.ophelisis.persistence.dao.MenuDAO;
import com.ophelisis.persistence.domain.MenuVO;

/**
 * <pre>
 * Class : com.ophelisis.persistence.dao.impl.MenuDAOImpl / MenuDAOImpl.java
 * 	Define Class Object : 
 * <br>
 * </pre>
 * @author hwanLee / apexcns,Inc.
 * @version 1.0
 * @see javadoc
 * @since 2013. 07. 29.
 */
@Repository
public class MenuDAOImpl implements MenuDAO {
	@Override
	public List<MenuVO> getMenuList() throws DataAccessException, SQLException, Exception {
		try {
			return handler_menu.getMenuList();
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		}
	}

	@Override
	public List<MenuVO> getMenuList(Map<String, Object> params) throws DataAccessException, SQLException, Exception {
		try {
			return handler_menu.getMenuList(params);
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		}
	}

	@Override
	public Integer setMenuDelete(MenuVO paramVO) throws DataAccessException, SQLException, Exception {
		try {
			return handler_menu.setMenuDelete(paramVO);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}

	@Override
	public Integer setMenuModify(MenuVO paramVO) throws DataAccessException, SQLException, Exception {
		try {
			return handler_menu.setMenuModify(paramVO);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}

	@Override
	public Integer setMenuAdd(MenuVO paramVO) throws DataAccessException, SQLException, Exception {
		try {
			return handler_menu.setMenuAdd(paramVO);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}

	@Override
	public Integer existMenu(Map<String, Object> params) throws DataAccessException, SQLException, Exception {
		try {
			return handler_menu.existMenu(params);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}
}
